using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DTO;
using BUSLayer;

namespace QuanLyThuVien
{
    public partial class frmTheLoai : Form
    {
        public frmTheLoai()
        {
            InitializeComponent();
        }

        private void btnThem_Click(object sender, EventArgs e)
        {
            try
            {
                LoaiSachDto loaisach = new LoaiSachDto();

                loaisach.LOAISACH = txtTenTheLoai.Text;
                LoaiSachBus.Them(loaisach);

                txtMaTheLoai.Text = loaisach.MALOAISACH.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}